import java.util.Scanner;

public class practice {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        double sum=0;
        double cur=0;
        double a=1.0;
        double b=2.0;
        for (int i = 0; i < n; i++) {
            sum+=b/a;
            cur=b;
            b=a+b;
            a=cur;
        }
        System.out.println(sum);
    }
}
